package com.tarim.streetdance.service.impl;

import com.tarim.streetdance.mapper.CommentSecondMapper;
import com.tarim.streetdance.model.CommentSecond;
import com.tarim.streetdance.model.CommentStair;
import com.tarim.streetdance.service.CommentSecondService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class CommentSecondServiceImpl implements CommentSecondService {

    @Autowired
    private CommentSecondMapper commentSecondMapper;

    @Override
    public int insertSelective(CommentSecond commentSecond) {
        commentSecond.setDr(0);
        commentSecond.setCreateTime(new Date());
        return commentSecondMapper.insertSelective(commentSecond);
    }

    @Override
    public int updateForDelete(CommentSecond commentSecond) {
        return commentSecondMapper.updateForDelete(commentSecond);
    }

    @Override
    public int updateForDeleteSecond(CommentStair commentStair) {
        return commentSecondMapper.updateForDeleteSecond(commentStair);
    }
}